package ExamLab.Test1;

class XSync implements Runnable{
	
    public void run(){
         synchronized("x"){
              System.out.print("X ");
              this.run2();
         }
    }
    public void run2(){
         synchronized("x"){
              System.out.print("X2 ");
         }
    }
}

public class MCe{
    public static void main(String args[]){
         XSync ns=new XSync();
         Thread t1=new Thread(ns);
         Thread t2=new Thread(ns);
         t1.start();
         t2.start();
    }
}